package designpatterns.command;

import org.junit.Test;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/15/2022 8:28 AM
 */
public class AppTest {

    @Test
    public void test() {
        Stock abcStock = new Stock();

        BuyStock buyStockOrder = new BuyStock(abcStock);
        SellStock sellStockOrder = new SellStock(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyStockOrder);
        broker.takeOrder(sellStockOrder);

        broker.placeOrders();
    }
}
